import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:s_k_todo/model/task_model.dart';
import 'package:s_k_todo/widget/task_step_list.dart';

import '../r.g.dart';

class UnStartTaskItem extends StatelessWidget {
  final TaskInfo entity;

  const UnStartTaskItem(this.entity, {super.key});

  @override
  Widget build(BuildContext context) => SizedBox(
    height: 150,
    child: Stack(
          children: [
            Positioned(
              left: 0,
              right: 0,
              bottom: 0,
              child: Row(
                crossAxisAlignment: CrossAxisAlignment.end,
                children: [
                  Expanded(
                      child: Container(
                    margin: const EdgeInsets.only(bottom: 10, left: 15),
                    height: 40,
                    child: TaskStepList(entity.stepList??[]),
                  )),
                  SvgPicture.asset(
                    R.svg.asset.task.assetName,
                    height: 100,
                  )
                ],
              ),
            ),
            Padding(
              padding: const EdgeInsets.only(left: 10, right: 10, top: 10),
              child: Column(
                children: [
                  Text(
                    entity.taskTitle ?? "",
                    style: Theme.of(context)
                        .textTheme
                        .titleMedium
                        ?.copyWith(fontWeight: FontWeight.normal),
                  )
                ],
              ),
            ),
          ],
        ),
  );
}
